
#ifndef INPUTSTATE_H
#define INPUTSTATE_H

namespace ETM
{
	//High-level functions for getting input.
	namespace Input
	{
		//Key state arrays for the current and previous keyboard state.
		extern bool keysCurrent[sf::Key::Count];
		extern bool keysPrevious[sf::Key::Count];

		//Gets all the key states from an sf::Input object and puts
		//them in the current or previous key state array.
		void SetCurrentState(const sf::Input& input);
		void SetPreviousState(const sf::Input& input);

		//Return wether the key is down or down for the first time.
		bool IsKeyDown(sf::Key::Code keyCode);
		bool IsKeyFirstDown(sf::Key::Code keyCode);

		//Return wether the key is up or up for the first time.
		bool IsKeyUp(sf::Key::Code keyCode);
		bool IsKeyFirstUp(sf::Key::Code keyCode);

		//High level functions for navigating through a menu.
		bool IsMenuUp();
		bool IsMenuDown();
		bool IsMenuBack();
		bool IsMenuSelect();
	}
}

#endif